libelf: "required" features should also be reported as "supported"
authorJan Beulich <jbeulich@novell.com>
Fri, 8 Jul 2011 07:35:00 +0000 (08:35 +0100)
committerJan Beulich <jbeulich@novell.com>
Fri, 8 Jul 2011 07:35:00 +0000 (08:35 +0100)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/common/libelf/libelf-dominfo.c

index 5f48d3fea31f0747259df252166ae8932360ac1f..67ec1468abe6dd65b637303f5f53178bd5841bd1 100644 (file)
@@ -64,13 +64,14 @@ int elf_xen_parse_features(const char *features,
         {
             if ( !elf_xen_feature_names[i] )
                 continue;
-            if ( (required != NULL) && (feature[0] == '!') )
+            if ( feature[0] == '!' )
             {
                 /* required */
                 if ( !strcmp(feature + 1, elf_xen_feature_names[i]) )
                 {
                     elf_xen_feature_set(i, supported);
-                    elf_xen_feature_set(i, required);
+                    if ( required )
+                        elf_xen_feature_set(i, required);
                     break;
                 }
             }